import uuid

from sqlalchemy import (
    Column,
    String,
    DateTime,
    PrimaryKeyConstraint,
    Boolean,
    text
)
from internal.extension.extension_db import db
class Proxy(db.Model):
    """旅行社表"""
    __tablename__ = 'proxy'
    __table_args__ = (
        PrimaryKeyConstraint('id', name='proxy_id_pkey'),
    )
    id = Column(String(36), nullable=False, default=lambda: str(uuid.uuid4()))
    deleted = Column(Boolean, nullable=False, default=False)
    user_name = Column(String(100), nullable=False)#用户名
    password = Column(String(100), nullable=False) #用户名
    updated_at = Column(
        DateTime,
        nullable=False,
        server_default=text("CURRENT_TIMESTAMP(0)"),
        server_onupdate=text("CURRENT_TIMESTAMP(0)"),
    )
    created_at = Column(DateTime, nullable=False, server_default=text("CURRENT_TIMESTAMP(0)"))
